home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / lib / c / exec / execv.c < prev    next >
Encoding:
C/C++ Source or Header  |  1991-12-20  |  1.4 KB  |  55 lines

  1. /* 
  2.  * execv.c --
  3.  *
  4.  *    Source code for the execv library procedure.
  5.  *
  6.  * Copyright 1988 Regents of the University of California
  7.  * Permission to use, copy, modify, and distribute this
  8.  * software and its documentation for any purpose and without
  9.  * fee is hereby granted, provided that the above copyright
  10.  * notice appear in all copies.  The University of California
  11.  * makes no representations about the suitability of this
  12.  * software for any purpose.  It is provided "as is" without
  13.  * express or implied warranty.
  14.  */
  15.  
  16. #ifndef lint
  17. static char rcsid[] = "$Header: /sprite/src/lib/c/exec/RCS/execv.c,v 1.1 88/06/19 16:55:59 ouster Exp $ SPRITE (Berkeley)";
  18. #endif not lint
  19.  
  20. /*
  21.  * Library imports:
  22.  */
  23.  
  24. extern char **environ;
  25. extern execve();
  26.  
  27.  
  28. /*
  29.  *----------------------------------------------------------------------
  30.  *
  31.  * execv --
  32.  *
  33.  *    Execute a process, using the current environment variable,
  34.  *    instead of an explicitly-supplied one.
  35.  *
  36.  * Results:
  37.  *    This procedure returns only if the exec fails.  In this case
  38.  *    the return value is -1.
  39.  *
  40.  * Side effects:
  41.  *    Overlays the current process with a new image.  See the man
  42.  *    page for details.
  43.  *
  44.  *----------------------------------------------------------------------
  45.  */
  46.  
  47. int
  48. execv(name, argv)
  49.     char *name;            /* Name of file containing program to exec. */
  50.     char **argv;        /* Array of arguments to pass to program. */
  51. {
  52.     execve(name, argv, environ);
  53.     return -1;
  54. }
  55.